<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Carbon - Admin Template</title>
    <link rel="stylesheet" href="/vendor/simple-line-icons/css/simple-line-icons.css">
    <link rel="stylesheet" href="/vendor/font-awesome/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="/css/styles.css">
</head>
<body class="sidebar-fixed header-fixed">
<div class="page-wrapper">
		<!-- 头部 Begin -->
    <div th:replace="~{common/common::topbar(lang=${lang},reqpage='employees.html')}" />
		<!-- 头部 End -->
		
    <div class="main-container">
    		
    		<!-- 菜单 Begin -->
        <div th:replace="~{common/common::menubar(lang=${lang},reqpage='employees.html')}" />
        <!-- 菜单 End -->
				
				<!-- 表格 Begin -->
        <div class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                        <div class="card-header bg-light">
                            <a th:href="@{/__${lang}__/employee}" class="btn btn-primary">Add Emp</a>
                        </div>

                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table table-striped">
                                    <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>EmpName</th>
                                        <th>Email</th>
                                        <th>Gender</th>
                                        <th>Department</th>
                                        <th>Birth</th>
                                        <th>Option</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="epee:${employeeList}">
                                        <td th:text="${epee.getId()}"/>
                                        <td th:text="${epee.getEmpName()}"/>
                                        <td th:text="${epee.getEmail()}"/>
                                        <td th:text="${epee.getGender()?'Male':'Female'}"/>
                                        <td th:text="${epee.getDepartment().getDepartmentName()}"/>
                                        <td th:text="${#dates.format(epee.getBirth(), 'yyyy-MM-dd')}"/>
                                        <td>
                                            <a th:href="@{/__${lang}__/employee/__${epee.getId()}__}" class="btn btn-primary">Edit</a>&nbsp;&nbsp;
                                            <a th:href="@{/__${lang}__/empdel/__${epee.getId()}__}" class="btn btn-danger" style="color: white">Delete</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 表格 End -->
    </div>
</div>
<script src="/vendor/jquery/jquery.min.js"></script>
<script src="/vendor/popper.js/popper.min.js"></script>
<script src="/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="/vendor/chart.js/chart.min.js"></script>
<script src="/js/carbon.js"></script>
<script src="/js/demo.js"></script>
</body>
</html>
